<template>
  <div class="container">
    <header>
      <div class="top gr">
        <div class="ct af">
          <!--<p>{{msg}}!</p>-->
          <!--<a href="javascript:;">服务者注册</a>-->
          <!--<a href="javascript:;">服务者登录</a>-->
          <div class="lf">
            <a class="a1" href="https://www.qiyebang.net.cn/">企业邦首页</a>
            <a class="a2" href="javascript:;">北京</a>
          </div>
          <div class="rt">
            <a href="javascript:;" class="a3">{{title.gr?title.gr.username:'用户名'}}</a>
            <a href="/PersonalCenter" class="a4">个人中心</a>
            <a href="/PersonalCenter/Order" class="a5">我的订单</a>
            <a href="/" class="a6">网站首页</a>
          </div>
        </div>
      </div>
      <div class="content">
        <div class="ct af gr">
          <h1 alt="企业邦（北京）创业服务有限公司"><a href="https://www.qiyebang.net.cn" ><img src="~/assets/img/logo.png" width="309px" height="46px"></a></h1>
          <div class="ss" @click="zkss" >
            <input type="text" placeholder="搜索所需服务，如公司注册" readonly="readonly"><a href="javascript:;">确定</a>
            <ul class="searchs" >
              <li v-for="(dt,id) in title.nav.oneTwoServiceData[0].twoServiceRes"><a :href="'/ServiceDetails/'+dt.id+'?name='+dt.id" target="_blank">{{dt.servicename}}</a></li>
              <li v-for="(dt,id) in title.nav.oneTwoServiceData[1].twoServiceRes"><a :href="'/ServiceDetails/'+dt.id+'?name='+dt.id" target="_blank">{{dt.servicename}}</a></li>
              <li v-for="(dt,id) in title.nav.oneTwoServiceData[2].twoServiceRes"><a :href="'/ServiceDetails/'+dt.id+'?name='+dt.id" target="_blank">{{dt.servicename}}</a></li>
              <li v-for="(dt,id) in title.nav.oneTwoServiceData[3].twoServiceRes"><a :href="'/ServiceDetails/'+dt.id+'?name='+dt.id" target="_blank">{{dt.servicename}}</a></li>
              <li v-for="(dt,id) in title.nav.oneTwoServiceData[4].twoServiceRes"><a :href="'/ServiceDetails/'+dt.id+'?name='+dt.id" target="_blank">{{dt.servicename}}</a></li>
            </ul>
          </div>
          <div class="rt">
            <a href="/PersonalCenter" class="a3 select">个人中心首页</a>
            <a href="/Mall" class="a4">我要购买</a>
            <a href="/PersonalCenter/Wallet" class="a5">我的钱包</a>
            <a href="javascript:;" @click="tcdl('userinfoRes','',-1)" class="a6">退出</a>

          </div>
        </div>
      </div>
    </header>
    <div class="divmc"></div>
    <div class="hh-grzx sc">
      <div class="nrct af">
        <div class="left">
          <h3><a href="/PersonalCenter">个人中心首页</a></h3>
          <div class="nr">
            <div class="div1">
              <h4>展示位管理</h4>
              <ul>
                <li class="li1"><a href="/Mall">我要购买</a></li>
              </ul>
            </div>
            <div class="div2">
              <h4>账号信息</h4>
              <ul>
                <li class="li1"><a href="javascript:;" @click="zymtz('Modify','/PersonalCenter/Modify?name=one')">修改个人信息</a></li>
<!--                <li class="li2"><a href="javascript:;" @click="zymtz('Modify','/PersonalCenter/Modify?name=phone')">修改手机号码</a></li>
                <li class="li3"><a href="javascript:;" @click="zymtz('Modify','/PersonalCenter/Modify?name=password')">修改密码</a></li>
                <li class="li4"><a href="javascript:;" @click="zymtz('Modify','/PersonalCenter/Modify?name=email')">修改邮箱</a></li> -->
              </ul>
            </div>
            <div class="div3">
              <h4>我的钱包</h4>
              <ul>
                <li class="li1"><a href="javascript:;" @click="zymtz('wallet','/PersonalCenter/wallet?name=giving','0')">赠送积分记录</a></li>
                <!--<li class="li2"><a href="javascript:;" @click="zymtz('wallet','/PersonalCenter/wallet?name=cumulative','1')" >累计积分</a></li>-->
                <li class="li2"><a href="javascript:;" @click="zymtz('wallet','/PersonalCenter/wallet?name=use','2')">积分使用记录</a></li>
                <!--<li class="li4"><a href="javascript:;" @click="zymtz('wallet','/PersonalCenter/wallet?name=remaining','3')">剩余积分</a></li>-->
              </ul>
            </div>
            <div class="div4">
              <h4>订单中心</h4>
              <ul>
                <li class="li1"><a href="javascript:;" @click="zymtz('Order','/PersonalCenter/Order?name=all','0')">全部订单</a></li>
                <li class="li2"><a href="javascript:;" @click="zymtz('Order','/PersonalCenter/Order?name=now','1')">展示中订单</a></li>
                <li class="li3"><a href="javascript:;" @click="zymtz('Order','/PersonalCenter/Order?name=overdue','2')">过期订单</a></li>
              </ul>
            </div>
            <div class="div5">
              <h4>我的收藏</h4>
              <ul>
                <li class="li1"><a href="/PersonalCenter/Collection">我收藏的广告位</a></li>
              </ul>
            </div>
            <div class="div6">
              <h4>来电中心</h4>
              <ul>
                <li class="li1"><a href="javascript:;" @click="zymtz('Call','/PersonalCenter/Call?name=all','0')">业务来电信息</a></li>
                <li class="li3"><a href="javascript:;" @click="zymtz('Call','/PersonalCenter/Call?name=qualification','2')">资质来电信息</a></li>
                <li class="li2"><a href="javascript:;" @click="zymtz('Call','/PersonalCenter/Call?name=me','1')">我兑换的信息</a></li>
              </ul>

            </div>
          </div>
        </div>
        <nuxt-child keep-alive :foobar=chuandi></nuxt-child>

      </div>
    </div>
    <div class="hh-zssc">
      <h3>展示位商城</h3>
      <p class="hp">注：每个展示位有效期为10天，购买成功后，无法取消或更换广告位。</p>
      <div class="sct1 sct af">
        <div class="lf">
          <h4>工商服务</h4>
          <ul class="af">
            <li class="li select"><a href="">公司注册</a></li>
            <li class="li"><a href="">公司变更 </a></li>
            <li class="li"><a href="">公司收购</a></li>
            <li class="li"><a href="">公司转让 </a></li>
            <li class="li"><a href="">公司注销</a></li>
          </ul>
        </div>
        <div class="rt">
          <ul class="af">
            <li class="li1">
              <div>
                <h5>有限责任公司注册</h5>
                <p class="p1">积分：<span>20</span></p>
                <p class="p2">收藏</p>
              </div>
              <a href="">立即购买</a>
            </li>
            <li class="li2">
              <div>
                <h5>有限责任公司注册</h5>
                <p class="p1">积分：<span>20</span></p>
                <p class="p2">收藏</p>
              </div>
              <a href="">立即购买</a>
            </li>
            <li class="li3">
              <div>
                <h5>有限责任公司注册</h5>
                <p class="p1">积分：<span>20</span></p>
                <p class="p2">收藏</p>
              </div>
              <a href="">立即购买</a>
            </li>
            <li class="li4">
              <div>
                <h5>有限责任公司注册</h5>
                <p class="p1">积分：<span>20</span></p>
                <p class="p2">收藏</p>
              </div>
              <a href="">立即购买</a>
            </li>
            <li class="li5">
              <div>
                <h5>有限责任公司注册</h5>
                <p class="p1">积分：<span>20</span></p>
                <p class="p2">收藏</p>
              </div>
              <a href="">立即购买</a>
            </li>
            <li class="li3">
              <div>
                <h5>有限责任公司注册</h5>
                <p class="p1">积分：<span>20</span></p>
                <p class="p2">收藏</p>
              </div>
              <a href="">立即购买</a>
            </li>
            <li class="li4">
              <div>
                <h5>有限责任公司注册</h5>
                <p class="p1">积分：<span>20</span></p>
                <p class="p2">收藏</p>
              </div>
              <a href="">立即购买</a>
            </li>
          </ul>
        </div>

      </div>
      <div class="sct2 sct af">
        <div class="lf">
          <h4>工商服务</h4>
          <ul class="af">
            <li class="li select"><a href="">公司注册</a></li>
            <li class="li"><a href="">公司变更 </a></li>
            <li class="li"><a href="">公司收购</a></li>
            <li class="li"><a href="">公司转让 </a></li>
            <li class="li"><a href="">公司注销</a></li>
          </ul>
        </div>
        <div class="rt">
          <ul class="af">
            <li class="li1">
              <div>
                <h5>有限责任公司注册</h5>
                <p class="p1">积分：<span>20</span></p>
                <p class="p2">收藏</p>
              </div>
              <a href="">立即购买</a>
            </li>
            <li class="li2">
              <div>
                <h5>有限责任公司注册</h5>
                <p class="p1">积分：<span>20</span></p>
                <p class="p2">收藏</p>
              </div>
              <a href="">立即购买</a>
            </li>
            <li class="li3">
              <div>
                <h5>有限责任公司注册</h5>
                <p class="p1">积分：<span>20</span></p>
                <p class="p2">收藏</p>
              </div>
              <a href="">立即购买</a>
            </li>
            <li class="li4">
              <div>
                <h5>有限责任公司注册</h5>
                <p class="p1">积分：<span>20</span></p>
                <p class="p2">收藏</p>
              </div>
              <a href="">立即购买</a>
            </li>
            <li class="li5">
              <div>
                <h5>有限责任公司注册</h5>
                <p class="p1">积分：<span>20</span></p>
                <p class="p2">收藏</p>
              </div>
              <a href="">立即购买</a>
            </li>
          </ul>
        </div>

      </div>
      <div class="sct3 sct af">
        <div class="lf">
          <h4>工商服务</h4>
          <ul class="af">
            <li class="li select"><a href="">公司注册</a></li>
            <li class="li"><a href="">公司变更 </a></li>
            <li class="li"><a href="">公司收购</a></li>
            <li class="li"><a href="">公司转让 </a></li>
            <li class="li"><a href="">公司注销</a></li>
          </ul>
        </div>
        <div class="rt">
          <ul class="af">
            <li class="li1">
              <div>
                <h5>有限责任公司注册</h5>
                <p class="p1">积分：<span>20</span></p>
                <p class="p2">收藏</p>
              </div>
              <a href="">立即购买</a>
            </li>
            <li class="li2">
              <div>
                <h5>有限责任公司注册</h5>
                <p class="p1">积分：<span>20</span></p>
                <p class="p2">收藏</p>
              </div>
              <a href="">立即购买</a>
            </li>
            <li class="li3">
              <div>
                <h5>有限责任公司注册</h5>
                <p class="p1">积分：<span>20</span></p>
                <p class="p2">收藏</p>
              </div>
              <a href="">立即购买</a>
            </li>
            <li class="li4">
              <div>
                <h5>有限责任公司注册</h5>
                <p class="p1">积分：<span>20</span></p>
                <p class="p2">收藏</p>
              </div>
              <a href="">立即购买</a>
            </li>
            <li class="li5">
              <div>
                <h5>有限责任公司注册</h5>
                <p class="p1">积分：<span>20</span></p>
                <p class="p2">收藏</p>
              </div>
              <a href="">立即购买</a>
            </li>
          </ul>
        </div>

      </div>
      <div class="sct4 sct af">
        <div class="lf">
          <h4>工商服务</h4>
          <ul class="af">
            <li class="li select"><a href="">公司注册</a></li>
            <li class="li"><a href="">公司变更 </a></li>
            <li class="li"><a href="">公司收购</a></li>
            <li class="li"><a href="">公司转让 </a></li>
            <li class="li"><a href="">公司注销</a></li>
          </ul>
        </div>
        <div class="rt">
          <ul class="af">
            <li class="li1">
              <div>
                <h5>有限责任公司注册</h5>
                <p class="p1">积分：<span>20</span></p>
                <p class="p2">收藏</p>
              </div>
              <a href="">立即购买</a>
            </li>
            <li class="li2">
              <div>
                <h5>有限责任公司注册</h5>
                <p class="p1">积分：<span>20</span></p>
                <p class="p2">收藏</p>
              </div>
              <a href="">立即购买</a>
            </li>
            <li class="li3">
              <div>
                <h5>有限责任公司注册</h5>
                <p class="p1">积分：<span>20</span></p>
                <p class="p2">收藏</p>
              </div>
              <a href="">立即购买</a>
            </li>
            <li class="li4">
              <div>
                <h5>有限责任公司注册</h5>
                <p class="p1">积分：<span>20</span></p>
                <p class="p2">收藏</p>
              </div>
              <a href="">立即购买</a>
            </li>
            <li class="li5">
              <div>
                <h5>有限责任公司注册</h5>
                <p class="p1">积分：<span>20</span></p>
                <p class="p2">收藏</p>
              </div>
              <a href="">立即购买</a>
            </li>
          </ul>
        </div>

      </div>
      <div class="sct5 sct af">
        <div class="lf">
          <h4>工商服务</h4>
          <ul class="af">
            <li class="li select"><a href="">公司注册</a></li>
            <li class="li"><a href="">公司变更 </a></li>
            <li class="li"><a href="">公司收购</a></li>
            <li class="li"><a href="">公司转让 </a></li>
            <li class="li"><a href="">公司注销</a></li>
          </ul>
        </div>
        <div class="rt">
          <ul class="af">
            <li class="li1">
              <div>
                <h5>有限责任公司注册</h5>
                <p class="p1">积分：<span>20</span></p>
                <p class="p2">收藏</p>
              </div>
              <a href="">立即购买</a>
            </li>
            <li class="li2">
              <div>
                <h5>有限责任公司注册</h5>
                <p class="p1">积分：<span>20</span></p>
                <p class="p2">收藏</p>
              </div>
              <a href="">立即购买</a>
            </li>
            <li class="li3">
              <div>
                <h5>有限责任公司注册</h5>
                <p class="p1">积分：<span>20</span></p>
                <p class="p2">收藏</p>
              </div>
              <a href="">立即购买</a>
            </li>
            <li class="li4">
              <div>
                <h5>有限责任公司注册</h5>
                <p class="p1">积分：<span>20</span></p>
                <p class="p2">收藏</p>
              </div>
              <a href="">立即购买</a>
            </li>
            <li class="li5">
              <div>
                <h5>有限责任公司注册</h5>
                <p class="p1">积分：<span>20</span></p>
                <p class="p2">收藏</p>
              </div>
              <a href="">立即购买</a>
            </li>
          </ul>
        </div>

      </div>



    </div>
    <my-ft></my-ft>
  </div>

</template>

<script>
  import axios from 'axios';
  import $ from 'jquery';
  export default {
    name: 'HelloWorld',
    data () {
      return {
        chuandi:null,
        selenv:false,
        grzx:{
          bj:'编辑'
        },
        title:null,
        fuwu:1
      }
    },
    async asyncData ({ req,params }) {

    let nh = await axios.get(`https://exam.zhonghaiqihang.com/PInterface/Header/headerData`);
    let nh2 = await axios.get(`https://exam.zhonghaiqihang.com/PInterface/Index/indexData`);
    let a = req.headers.cookie;
    let cookie = '';
    if(a.indexOf('userinfoRes')!=-1){
      let b = a.split('userinfoRes=');
      let c = b[1].split(';');
      cookie = c[0];
    }
    let gr = await axios.get(`https://exam.zhonghaiqihang.com/PInterface/UserCenter/userCenterIndexData?userid=`+cookie)

    let nh3 = await axios.get(`https://exam.zhonghaiqihang.com/PInterface/Special/specialData`,{
      params:{
        serviceid:'44'
      }});
    let nh4 = await axios.get(`https://exam.zhonghaiqihang.com/PInterface/Receptionist/receptionistData`);
    let nh6 = await axios.get(`https://exam.zhonghaiqihang.com/PInterface/UserCenter/allShowNumOrder`,{
      params:{
        userid:1
      }});
    let nh7 = await axios.get(`https://exam.zhonghaiqihang.com/PInterface/UserCenter/inDisplayShowNumOrder`,{
      params:{
        userid:1
      }});
    let nh8 = await axios.get(`https://exam.zhonghaiqihang.com/PInterface/UserCenter/overdueShowNumOrder`,{
      params:{
        userid:1
      }});
    let data  = {nav:nh.data,index:nh2.data,zym:nh3.data,gj:nh4.data,all:nh6.data,zsz:nh7.data,gq:nh8.data,gr:gr.data};
    return { title: data}
  },
  mounted:function(){
    $('.tbnava1').addClass('select');
    var domain = window.location.href;
    $(document).ready(function(){
      $('.hh-xgzl .div .bj').click(function(){
        $(this).toggleClass('select');
        $(this).siblings('strong').toggleClass('select');
        $(this).parent().siblings('.ycd').toggleClass('select');
        $(this).parent().siblings('.tx').toggleClass('select');
        if($(this).text()=='编辑'){
          $(this).html('展开<i></i>');
        }else if($(this).text()=='展开'){
          $(this).html('编辑<i></i>');
        }
      });
      $('.hh-grzx .left li').click(function(){
        $('.hh-grzx .left li').removeClass('select');
        $(this).addClass('select');
      });

      $('.hh-xgzl .div .bc').click(function(){
        $(this).parent().parent().children('strong').removeClass('select');
        // $(this).parent().parent().children('.bj').html('编辑<i></i>');
        // $(this).parent().removeClass('select');

      });
      $(document).ready(function () {
        $('.htcfw').hide();
      });


    })

  },
  computed: {
    loadList() {
      return (type) => {
        let newData = [];
        this.title.nav.threeServiceData.forEach(item => {
          if(item.pid == type) {
          newData.push(item);
        }
      });
        return newData;
      };
    }
  },head () {
    return {
      title: '个人中心-企业邦',
      meta: [
        { hid: 'description', name: 'description', content:'个人中心-企业邦'},
        { hid: 'keywords', name: 'keywords', content:'个人中心-企业邦'}
      ]
    }
  },methods:{
    tzlj:function(e){
      // const new3 = this.$router.resolve({name: e});
      // window.open(new3.href,'_self');
      this.$router.push('/'+e);
    },
    tzlj1:function(e){
      // const new3 = this.$router.resolve({name: this.dhlj[e]});
      // window.open(new3.href,'_self');
      this.$router.push(e);
    },
    cao:function(e1,e2){
      this.chuandi = e1;
      var _this = this;
        _this.$router.push(e2);
    },
    tcdl:function(e1,e2,e3){
      var d = new Date();
      d.setTime(d.getTime()+(e3*24*60*60*1000));
      var expires = "expires="+d.toGMTString();
      document.cookie = e1 + "=" + e2 + "; " + expires;

      let a = document.cookie;
      let cookie = '';
      if(a.indexOf('userinfoRes')!=-1){
        let b = a.split('userinfoRes=');
        let c = b[1].split(';');
        cookie = c[0];
      }
      if(cookie == ''){
        window.open('/','_self');
      }else{
        window.open('/?name=tc','_self');
      }

      // this.$router.push('/?name=tc');
    },
    xqymtz:function(e1,e2){

      let href = '/ServiceDetails/'+e1+'?name='+e2;
      window.open(href,'_blank');
    },zkss:function(){
      $('.searchs').toggleClass('select');
    }
    ,zymtz:function(e,e2,e3){
      let a = window.location.href;
      let a1 = a.split('PersonalCenter/');
      this.chuandi = e3;

      if(a1 == 'https://localhost:3000/PersonalCenter'||a1 == 'https://www.qiyebang.net.cn/PersonalCenter'){
        window.open(e2,'_self')
      }else{
        let a2 = a1[1].split('?');
        let a3 = a2[0];
        if(e == a3){
          this.$router.push(e2);
        }else{
          window.open(e2,'_self')

        }
      }


    }
  }
  }
</script>

<style>

</style>
